<template>
  <BaseChatMsg :avatar="avatar" :align="align">
    <template v-slot:chatcontent>
      <div class="text"  v-html="content"></div>
    </template>
  </BaseChatMsg>
</template>

<script>
import BaseChatMsg from './BaseChatMsg.vue'
export default {
  name: 'ChatMsgText',
  components: { BaseChatMsg },
  props: {
    avatar: String,
    content: String,
    name: String,
    align: {
      type: String,
      validator: (value) => {
        return ['left', 'right'].includes(value)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  .text {
    word-break: break-all;
  }
</style>
